#!/usr/bin/env python

import os
import sys

try:
 import wx
 import bluetooth
 import numpy

except:
 print "\nRequired package(s) not installed"

 if not os.geteuid()==0:
  sys.exit("\nPlease run this script as root initially\n")

 else:
  print "Installing required packages: python-wxgtk2.8, python-numpy, and python-bluez"
  os.popen('aptitude install python-wxgtk2.8 python-numpy python-bluez -y')

if not os.geteuid()==0:
  print "Please run this application as root e.g. sudo ./run.py"

else:
 import WifiPositioner
 WifiPositioner.MyApp()
